{extend name="template/base" /}

{block name="content"}
<div class="page-container">
    <div class="toptip">
    <h2>提示：</h2>
    <p>
      添加学员账号及相关信息<br>
    </p>
</div>
<div class="cl pd-5 bg-1 bk-gray form-search">
<form class="mb-20" method="get" action="{:\\think\\Url::build($Request.action)}">
  


    <script type="text/javascript">
    var labelFromcity = new Array();
    labelFromcity ['全部'] = new Array(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40);
    labelFromcity ['A-F'] = new Array(0,3,4,5,6,28,29);
    labelFromcity ['G-J'] = new Array(1,7,8,9,30,31,32,33,37,40);
    labelFromcity ['K-N'] = new Array(10,11,12,34,35,38);
    labelFromcity ['P-W'] = new Array(13,14,15,16,17,18,22,24,25,36);
    labelFromcity ['X-Z'] = new Array(2,19,20,21,26,27,39);

    var hotList = new Array(14,15,16,17,18,19);

    $(document).ready(function(){
        $('#fromcity').querycity({'data':citysFlight,'tabs':labelFromcity,'hotList':hotList});
        $('#tocity').querycity({'data':citysFlightTo});
    });
    </script>
   

        <input type="text" class="input-text" style="width:150px"  id='fromcity' type='text' value='' />
   

    <input type="text" class="input-text" style="width:80px" placeholder="姓名" name="realname" value="{$Request.param.realname}">
    <input type="text" class="input-text" style="width:150px" placeholder="身份证" name="idcard" value="{$Request.param.idcard}">
    <input type="text" class="input-text" style="width:110px" placeholder="手机" name="phone" value="{$Request.param.phone}">
    <input type="text" class="input-text" style="width:80px" placeholder="职位" name="position" value="{$Request.param.position}">

    <input type="text" class="input-text" style="width:150px" placeholder="公司名称" name="companyname" value="{$Request.param.companyname}">
    <div style="margin-top:1px;width:100px;" class="select-box sbox">
        <select name="companyid" class="select">
            <option value="">公司不限</option>
            {volist name='CompanyList' id='vo'}
            <option value="{$vo.id}" {$Request.param.companyid ==$vo.id ? 'selected' : ''}>{$vo.name}</option>
            {/volist}
        </select>
    </div>

    <div style="margin-top:1px;width:100px;" class="select-box sbox">
        <select name="vface" class="select">
            <option value="">部门不限</option>
			{volist name='dments' id='voc'}
            <option value="{$voc.id}" {$Request.param.vface ==$voc.id ? 'selected' : ''}>{$voc.name}</option>
            {/volist}

        </select>
    </div>

    <div style="margin-top:1px;width:100px;" class="select-box sbox">
        <select name="specialtyid" class="select" datatype="*" nullmsg="请选择所属分类">
            <option value>专业不限</option>
                        {volist name='specialtyList' id='vo'}
                        <option value="{$vo.id}" {$Request.param.specialtyid ==$vo.id ? 'selected' : ''}>{$vo.name}</option>
                        {/volist}
         </select>
    </div>
     <div style="margin-top:1px;width:100px;" class="select-box sbox">
        <select name="vface" class="select">
            <option value="">认证不限</option>
            <option value="no" {$Request.param.vface == 'no' ? 'selected' : ''}>未上传</option>
            <option value="1" {$Request.param.vface ==1 ? 'selected' : ''}>审核失败</option>
            <option value="2" {$Request.param.vface ==2 ? 'selected' : ''}>审核通过</option>
            <option value="3" {$Request.param.vface ==3 ? 'selected' : ''}>审核中</option>
         </select>
    </div>

    <button style="margin-top:2px;" type="submit" class="btn btn-success radius"><i class="Hui-iconfont">&#xe665;</i>查询</button>
</form>
</div>
    <div class="cl pd-5 bg-1 bk-gray">
        <span class="l">
            <a class="btn btn-primary radius mr-5" href="javascript:;" onclick="layer_open('添加', '/admin/user/add.html',{w:'100%'})"><i class="Hui-iconfont">&#xe610;</i> 新增人员</a>
           <!--  <a class="btn btn-primary radius mr-5" href="javascript:;" onclick="layer_open('添加', '/admin/user/batchimport.html',{w:'100%'})"><i class="Hui-iconfont">&#xe610;</i> 批量添加</a>

            <a class="btn btn-primary radius mr-5" href="javascript:;" onclick="layer_open('管理添加人员列表', '/admin/user/batchDelete.html',{w:'100%',type:2})"> 管理添加人员列表</a>
            <a class="btn btn-primary radius mr-5" href="javascript:;" onclick="layer_open('管理失效人员列表', '/admin/user/offline.html',{w:'100%',type:2})"> 管理失效人员列表</a> -->
            {tp:menu menu="delete,recyclebin" /}
            <input type="checkbox" onclick="changeAllowEdit();" id="check" {if condition="$isAllowEdit"}checked{/if}>允许用户修改资料
        </span>
        <span class="r pt-5 pr-5">
            共有数据 ：<strong>{$count}</strong> 条
        </span>
    </div>
    <table class="table table-border table-bordered table-hover table-bg mt-20">
        <thead>
            <tr class="text-c">
                {include file="th" /}
                <th width="220">操作</th>
            </tr>
        </thead>
        <tbody>
            {volist name="list" id="vo"}
            <tr class="text-c">
                {include file="td" /}
                <td class="f-14">
                    <!--{$vo.status|show_status=$vo.userid}-->
                    <a title="编辑" href="javascript:;" onclick="layer_open('编辑', '/admin/user/edit/id/{$vo.userid}.html')" style="text-decoration:none" class="ml-5"><i class="Hui-iconfont"></i></a>
                   <!--  {tp:menu menu='password' url='password:id=$vo.userid' title='修改密码' class='label-secondary' /} -->
                    <a title="审核照片" href="javascript:;" onclick="layer_open('审核照片','/admin/user/verifyPhoto/userid/{$vo.userid}')" class="label radius ml-5 label-secondary">审核照片</a>
                    <a title="审核照片" href="javascript:;" onclick="layer_open('个人档案','/admin/Archives_User/index/identity_id/{$vo.id}')" class="label radius ml-5 label-secondary">个人档案</a>

                </td>
            </tr>
            {/volist}
        </tbody>
    </table>
    <div class="page-bootstrap">{$page}</div>
</div>
<script>
    //     function getphoto(userid) {

    //         var url = "{:\\think\\Url::build('ajaxUserPhoto')}";
    // //        var len = url.length;
    //        url = url+"?userid="+userid;
    //         $.ajax({
    //             url: url,
    //             type: 'POST',
    //             dataType: 'json',
    //             success: function (data) {
    //                 tmp = $.parseJSON(data);
    //             }
    //         });
    //     }

    function changeAllowEdit()
    {
        var value = $('#check').prop("checked");
        var allow = null;
        if(value){
            allow = 1;
        }else{
            allow = 0;
        }
        var url = "{:\\think\\Url::build('user/ajaxChangeAllow')}";
        var len = url.length;
        var url = url.substr(0,len-5)+'/allow/'+allow+'.html';
        $.get(url, function (data) {
            if(data == 1){
                if(allow == 1){
                    alert('已开启用户编辑信息')
                }else{
                    alert('已关闭用户编辑信息')
                }
            }else{
                alert('操作失败,请联系管理员');
            }
            window.location.reload();
        });
    }
</script>
{/block}

